package com.dzm.content.controller.api;

import com.dzm.content.entity.ContentCategory;
import com.dzm.content.service.ContentCategoryService;
import com.dzm.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 作者：Dzm
 * 时间：2024-09-13-17:02
 * 功能：
 */

@RestController
@RequestMapping("/api/cate")
public class CategoryController {

    @Autowired
    private ContentCategoryService categoryService;

    @GetMapping("/list")
    public R list() {
        List<ContentCategory> list = categoryService.list();

        return R.ok().data("list", list);
    }
}
